<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="/">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../index/top.jsp"%>
</head>
<body class="no-skin">
	<!-- /section:basics/navbar.layout -->
	<div class="main-container" id="main-container">
		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner">
				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
								<form action="activity/${msg }.do" name="activityForm" id="activityForm" method="post">
									<div id="zhongxin" style="padding-top: 13px;">
									<input type="hidden" id="id" name="id" value="${id}" />
									<table id="table_report" class="table table-striped table-bordered table-hover">
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动编码:</td> <!-- onchange="hasN()" -->
											<td><input type="text" name="code" id="code" value="${activity.code}" maxlength="32" placeholder="这里输入活动编码" title="活动编码"  style="width:98%;"/></td>
										</tr>
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动名字:</td>
											<td><input type="text" name="name" id="name" value="${activity.name}" maxlength="32" placeholder="这里输入活动名字" title="活动名字"  style="width:98%;"/></td>
										</tr> 
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动说明:</td> <!-- onchange="hasN()" -->
											<td><input type="text" name="remark" id="remark" value="${activity.remark}" maxlength="32" placeholder="这里输入活动说明" title="活动说明"  style="width:98%;"/></td>
										</tr>
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动标签:</td>
											<td id="juese">
											<select class="chosen-select form-control" name="label" id="label" style="vertical-align:top;" style="width:98%;" >
											<option value=""></option> 
											<c:forEach items="${activityLabelList}" var="activityLabel">
												<option value="${activityLabel.labelCode }" <c:if test="${activityLabel.labelCode == activity.label }">selected</c:if> >${activityLabel.labelName }</option>
											</c:forEach>
											</select>
											</td>
										</tr>
										<tr>
                                        	<td style="width:79px;text-align: right;padding-top: 13px;">开始时间: </td>
                                        	<td><input id="startTime" name="startTime"  placeholder="请选择开始时间" value="${activity.startTime }"/></td>
                                    	</tr>
                                    	<tr>
                                        	<td style="width:79px;text-align: right;padding-top: 13px;">结束时间: </td>
                                        	<td><input id="endTime" name="endTime"  placeholder="请选择结束时间" value="${activity.startTime }"/></td>
                                    	</tr>
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动状态:</td>
											<td id="juese">
												<select class="chosen-select form-control" name="state" id="state" style="vertical-align:top;" style="width:98%;" >
													<option value=""></option>
													<option value="00" <c:if test="${ activity.state == 00 }">selected</c:if>>未启动</option>  
													<option value="01" <c:if test="${ activity.state == 01 }">selected</c:if>>已启动</option> 
												</select>
											</td>
										</tr>
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动类型:</td>
											<td id="juese">
												<select class="chosen-select form-control" name="type" id="type" style="vertical-align:top;" style="width:98%;" >
													<option value=""></option>
													<option value="00" <c:if test="${ activity.type == 00 }">selected</c:if>>累计下线</option>  
													<option value="01" <c:if test="${ activity.type == 01 }">selected</c:if>>二级分润</option> 
													<option value="02" <c:if test="${ activity.type == 02 }">selected</c:if>>多级分润</option>
												</select>
											</td>
										</tr>
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">黑白名单:</td>
											<td id="juese">
												<select class="chosen-select form-control" name="action" id="action" style="vertical-align:top;" style="width:98%;" >
													<option value=""></option>
													<option value="00" <c:if test="${ activity.action == 00 }">selected</c:if>>白名单</option>  
													<option value="01" <c:if test="${ activity.action == 01 }">selected</c:if>>黑名单</option> 
													<option value="02" <c:if test="${ activity.action == 02 }">selected</c:if>>全部</option>
												</select>
											</td>
										</tr>
									</table>
									<table id="table_report1" class="table table-striped table-bordered table-hover">										
										<tr>
											<td style="text-align: center;" colspan="10">
												<a class="btn btn-mini btn-primary" onclick="save();">保存</a>								
												<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
											</td>
										</tr>
									</table>
									</div>
									<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green"></h4></div>
								</form>
						</div>
						<!-- /.col -->
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
		</div>
		<!-- /.main-content -->
	</div>
	<!-- /.main-container -->
	<!-- basic scripts -->
	<!-- 页面底部js¨ -->
	<%@ include file="../index/foot.jsp"%>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- inline scripts related to this page -->
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
	
	<script type="text/javascript" src="static/js/common/file_upload.js"></script>
	<script type="text/javascript" src="static/laydate/laydate.js"></script>
	<script type="text/javascript" src="plugins/kindeditor/lang/zh_CN.js"></script>
</body>
<script type="text/javascript">
	$(top.hangge());
	var startTime = {
	        elem: '#startTime',
	        format: 'YYYY-MM-DD hh:mm:ss',
	        min: laydate.now(), //设定最小日期为当前日期
	        max: '2099-06-16 23:59:59', //最大日期
	        istime: true,
	        istoday: true,
	        choose: function (datas) {
	            endTime.min = datas; //开始日选好后，重置结束日的最小日期
	            endTime.start = datas //将结束日的初始值设定为开始日
	        }
	    };

	    var endTime = {
	        elem: '#endTime',
	        format: 'YYYY-MM-DD hh:mm:ss',
	        min: laydate.now(),
	        max: '2099-06-16 23:59:59',
	        istime: true,
	        istoday: true,
	        choose: function (datas) {
	            startTime.max = datas; //结束日选好后，重置开始日的最大日期
	        }
	    };
	    laydate(startTime);
	    laydate(endTime);
	//保存
	function save(){
		$("#activityForm").submit();
		$("#zhongxin").hide();
	    $("#zhongxin2").show(); 
	}

	
</script>
</html>